package com.chongdong.work.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.chongdong.annotation.CDAutowried;
import com.chongdong.annotation.CDController;
import com.chongdong.annotation.CDRequestMapping;
import com.chongdong.annotation.CDRequestParam;
import com.chongdong.work.service.CDUserService;

@CDController
@CDRequestMapping("/user")
public class CDUserController {
	
	@CDAutowried
	CDUserService cDUserService;
	
	@CDRequestMapping("/getUserList")
	public void getUserList(HttpServletRequest request,HttpServletResponse response,
			@CDRequestParam("userId") Long userId) {
		try {
			response.getWriter().write(cDUserService.getUserByUserId(userId).toString());
		} catch (IOException e) {
			
		}
	}
}
